package com.ljkj.cordial.chat.bean;

import com.ljkj.cordial.chat.base.ChatApp;

public class Canstants {
    public static final boolean DEFAULT_MAC = true;

    public static final String KEY_UserId = "userId";
    public static final String KEY_VisitorId = "visitorId";
    public static final String KEY_UseType = "userType";
    public static final String KEY_AvatarId = "AvatarId";
    public static final String KEY_Nickname = "Nickname";
    public static final String KEY_Avatar = "KEY_Avatar";
    public static final String KEY_USER_INFO = "KEY_USER_INFO";
    public static final String KEY_USER_INFO_EXIT = "KEY_USER_INFO_EXIT";
    //是否接收离线
    public static final String KEY_SYS_IS_RECEIVE_OFFLINE_MSG = "sys_is_receive_offline_msg";
    //是否每天清理消息
    public static final String KEY_SYS_IS_EVERYDAY_CLEAR = "sys_is_everyday_clear_msg";
    // 是否开启消息提示音
    public static final String KEY_SYS_IS_MESSAGE_TONE = "key_sys_is_message_tone";

    //清理周期
    public static final String KEY_SYS_CLEAR_CYC = "sys_clear_cyc";
    //清理周期
    public static final String KEY_SYS_CLEAR_CYC_TAG_TIME = "sys_clear_cyc_tag_time3";
    //好友是否阅后即焚
    public static final String KEY_SYS_IS_READ_FINISH_CLEAR_SINGLE = "is_rfc_s";
    //群组是否阅后即焚
    public static final String KEY_SYS_IS_READ_FINISH_CLEAR_GROUP = "is_rfc_g";
    //好友阅后即焚周期
    public static final String KEY_SYS_READ_FINISH_CYC_SINGLE = "srf_s";
    //群聊阅后即焚周期
    public static final String KEY_SYS_READ_FINISH_CYC_GROUP = "srf_g";

    /**
     * 全局
     *
     * @param userId
     * @return
     */
    public static String getGroupReadFinishKey(String userId) {
        return KEY_SYS_READ_FINISH_CYC_GROUP + "_" + userId;
    }

    public static String isGroupReadFinishKey(String userId) {
        return KEY_SYS_IS_READ_FINISH_CLEAR_GROUP + "_" + userId;
    }

    /**
     * 单个群
     *
     * @param groupId
     * @param userId
     * @return
     */
    public static String getGroupReadFinishKey(String groupId, String userId) {
        return KEY_SYS_READ_FINISH_CYC_GROUP + "_" + groupId + "_" + userId;
    }

    public static String isGroupReadFinishKey(String groupId, String userId) {
        return KEY_SYS_IS_READ_FINISH_CLEAR_GROUP + "_" + groupId + "_" + userId;
    }

    /**
     * 全局
     *
     * @param userId
     * @return
     */
    public static String getSingleReadFinishKey(String userId) {
        return KEY_SYS_READ_FINISH_CYC_SINGLE + "_" + userId;
    }

    public static String isSingleReadFinishKey(String userId) {
        return KEY_SYS_IS_READ_FINISH_CLEAR_SINGLE + "_" + userId;
    }

    /**
     * 单个好友
     *
     * @param targetId
     * @param userId
     * @return
     */
    public static String getSingleReadFinishKey(String targetId, String userId) {
        return KEY_SYS_READ_FINISH_CYC_SINGLE + "_" + targetId + "_" + userId;
    }

    public static String isSingleReadFinishKey(String targetId, String userId) {
        return KEY_SYS_IS_READ_FINISH_CLEAR_SINGLE + "_" + targetId + "_" + userId;
    }

    //注册者
    public static final int KEY_REGISTER = 0;
    //游客
    public static final int KEY_VISITOR = 1;
    //群访问者
    public static final int KEY_GROUP_VISITOR = 2;
    //类型
    public static final String KEY_TYPE = "type";
    public static final String KEY_PHONE = "phone";
    //备注
    public static final String KEY_REMARK = "remark";
    //备注状态
    public static final int KEY_REMARK_RESULT = 233;
    //单聊
    public static final int SINGLE_CHAT = 1;
    //群聊
    public static final int GROUP_CHAT = 2;
    //公告类型
    public static final String KEY_GROUP_NOTICE = "group_notice";
    //公告状态
    public static final int KEY_GROUP_NOTICE_RESULT = 234;
    //邀请好友
    public static final String KEY_GROUP_INVITE = "group_invite";
    //邀请好友状态
    public static final int KEY_GROUP_INVITE_RESULT = 235;
    //申请同意
    public static final int KEY_APPLY_AGREE_RESULT = 335;

    public static final String EXTRA_KEY_GROUP_ID = "EXTRA_KEY_GROUP_ID";
    public static final String EXTRA_KEY_GROUP_NAME = "EXTRA_KEY_GROUP_NAME";

    public static final int MEMBER_STATE_NORMAL = 0;
    public static final int MEMBER_STATE_ADD = 1;
    public static final int MEMBER_STATE_REMOVE = 2;
    public static final int MEMBER_STATE_CREATE = 3;
    public static final String KEY_MEMBER_INVITE_TYPE = "member_invite_type";
    public static final int STATE_REGISTER = 1;
    public static final int STATE_FIND_PASSWORD = 2;
    public static final String KEY_REGISTER_OR_FIND_PSD = "register_or_find_psd";
    public static final int STATE_VISITER_LOGIN = 1;
    public static final int STATE_REGISTER_LOGIN = 2;
    public static final int STATE_REGISTER_LOGINOUT = 3;
    public static final String KEY_REGISTER_OR_VISITER = "register_or_login";

    /**
     * 搜索结果
     */
    public static final String KEY_SEARCH_RESULT = "search_result";
    public static final String KEY_SEARCH_RESULT_INFO = "search_result_info";
    public static final int KEY_SEARCH_FRIEND = 236;
    public static final int KEY_SEARCH_GROUP = 237;

    /**
     * 系统通知
     */
    public static final int MSG_TYPE_NOTIFY_SYS = 1;
    /**
     * 好友申请通知
     */
    public static final int MSG_TYPE_NOTIFY_FRIEND = 2;
    /**
     * 入群申请通知
     */
    public static final int MSG_TYPE_NOTIFY_GROUP = 3;
    /**
     * 好友申请通过通知
     */
    public static final int MSG_TYPE_NOTIFY_FRIEND_PASS = 4;
    /**
     * 入群申请通过通知
     */
    public static final int MSG_TYPE_NOTIFY_GROUP_PASS = 5;
    /**
     * 好友申请拒绝通知
     */
    public static final int MSG_TYPE_NOTIFY_FRIEND_REFUSED = 6;
    /**
     * 入群申请拒绝通知
     */
    public static final int MSG_TYPE_NOTIFY_GROUP_REFUSED = 7;
    public static final String KEY_TITLE = "title";
    public static final int TYPE_MODIFY = 1;
    public static final int TYPE_ADD = 2;
    public static final int RESULT_CODE_300 = 300;
    public static final int REQUEST_CODE_300 = 300;
    public static final int REQUEST_CODE_301 = 301;
    public static final String KEY_GROUP_ID = "group_id";
    public static final String KEY_NICKNAME = "nickname";
    public static final String KEY_MEMBER_ID = "memberId";
    public static final String KEY_OPTION = "key_option";

    public static final String KEY_CHAT_TARGET_NAME = "key_target_name";
    public static final String KEY_CHAT_TARGET_ID = "key_target_id";
    public static final String KEY_CHAT_TARGET_GROUP = "key_target_group";
    public static final String KEY_CHAT_TARGET_MEMBER = "key_target_member";
    public static final String KEY_CHAT_TARGET_TYPE = "key_target_type";
    public static final String KEY_LEAVE_INFO = "key_leave_info";
    public static final int REQUEST_CODE_BACK = 99;
    public static final String ONLINE = "online";
    public static final String OFFLINE = "offline";
    public static final int CLEAR_TIME = 0;
    public static final int CLEAR_DAY = 1;
    public static final int CLEAR_WEEK = 7;
    public static final int CLEAR_MONTH = 30;
    public static final int REQUEST_CODE_302 = 302;
    public static final int RESULT_CODE_302 = 302;
    public static final String FILE_PATH = "file_path";
    public static final String Off = "Off";
    public static final String On = "On";
    public static final String KEY_INFO = "key_info";

    public static final String KEY_GROUP_OWNER_ID = "key_group_owner_id";
    public static final String ACTION_REFRESH_DATA = "action_refresh_data";
    public static final String KEY_SEARCH_TYPE = "key_search_type";
    public static final int SEARCH_TYPE_FRIEND_GROUP = 0;
    public static final int SEARCH_TYPE_FRIEND = 1;
    public static final int SEARCH_TYPE_GROUP = 2;

    public static final int MODIFT_TARGETNAME_CODE = 10086;
    public static final String KEY_FONT_SIZE = "key_font_size";
    public static final String KEY_CHAT_TARGET_SELECTED_ID = "key_chat_target_selected_id";
    public static final String KEY_CHAT_LIST = "key_chat_list";
    public static final String KEY_CHAT_SORT = "key_chat_sort";
    public static final String KEY_CLEAR_TASK = "key_clear_task";

    public static final String NOTIFY_KEY_FROM = "notify_key_from";
    public static final String NOTIFY_KEY_IS_CHAT = "notify_key_is_chat";
    public static final String NOTIFY_KEY_TYPE = "notify_key_type";
    public static final String NOTIFY_KEY_TARGET_NAME = "notify_key_target_name";
    public static final String NOTIFY_KEY_TARGET_ID = "notify_key_target_id";
    public static final String NOTIFY_KEY_TARGET_TYPE = "notify_key_target_type";

    public static final String getClearKey() {
        return KEY_SYS_IS_EVERYDAY_CLEAR + ChatApp.getInstance().getUserId();
    }

    public static final String getSysClearCycKey() {
        return KEY_SYS_CLEAR_CYC + ChatApp.getInstance().getUserId();
    }

    public static final String getSysClearCycTimeKey() {
        return KEY_SYS_CLEAR_CYC_TAG_TIME + ChatApp.getInstance().getUserId();
    }

}
